package zju.ccnt.rest.service.exception;

import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;
import zju.ccnt.exception.BaseWebApplicationException;

/**
 * Created by zha on 14/11/11.
 */
@ResponseStatus(value = HttpStatus.FORBIDDEN, reason = "No permission.")
public class NoPermissionException extends BaseWebApplicationException {
    public NoPermissionException(String currentUser, String target, String action){
        super(HttpStatus.FORBIDDEN, currentUser + " attempt to " + action + " on " + target);
    }
}
